//index.js
/* 
	首页轮播图:  https://locally.uieee.com/slides
	首页九宫格图: https://locally.uieee.com/categories
*/
const fetch = require("../../utils/fetch.js");

Page({
	data: {
		bgImages: [],
		navitems: []
	},

	onLoad: function (options) {
		// 轮播
		fetch("slides").then(res => {
			this.setData({
				bgImages: res.data
			});
		});
		fetch("categories").then(res => {
			this.setData({
				navitems: res.data
			});
		});
	}
});